.class Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/OrientationRequestedEvent;
.super Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/AbstractParseParamsEvent;
.source "OrientationRequestedEvent.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/AbstractParseParamsEvent",
        "<",
        "Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ExpandAndOrientationProperties;",
        ">;"
    }
.end annotation


# static fields
.field static final EVENT_ID:I = 0xc


# instance fields
.field private mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;


# direct methods
.method protected constructor <init>()V
    .locals 1

    .prologue
    .line 43
    const-class v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ExpandAndOrientationProperties;

    invoke-direct {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/AbstractParseParamsEvent;-><init>(Ljava/lang/Class;)V

    .line 44
    return-void
.end method


# virtual methods
.method public parsed(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ExpandAndOrientationProperties;)V
    .locals 4
    .parameter "properties"

    .prologue
    .line 54
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/OrientationRequestedEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->isInterstitial()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 55
    new-instance v2, Lcom/burstly/lib/util/ScreenOrientationManager;

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/OrientationRequestedEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getContext()Landroid/content/Context;

    move-result-object v1

    check-cast v1, Landroid/app/Activity;

    invoke-direct {v2, v1}, Lcom/burstly/lib/util/ScreenOrientationManager;-><init>(Landroid/app/Activity;)V

    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ExpandAndOrientationProperties;->getForceOrientation()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ExpandAndOrientationProperties;->getAllowOrientationChange()Ljava/lang/Boolean;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v3

    invoke-virtual {v2, v1, v3}, Lcom/burstly/lib/util/ScreenOrientationManager;->setOrientation(Ljava/lang/String;Z)V

    .line 64
    :cond_0
    :goto_0
    return-void

    .line 57
    :cond_1
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/OrientationRequestedEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    iget-object v1, v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->mViewState:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;->getState()Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    move-result-object v1

    sget-object v2, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->EXPANDED:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    if-ne v1, v2, :cond_0

    .line 58
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/OrientationRequestedEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-virtual {v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getScreenOrientationMgr()Lcom/burstly/lib/util/ScreenOrientationManager;

    move-result-object v0

    .line 59
    .local v0, screenOrientationMgr:Lcom/burstly/lib/util/ScreenOrientationManager;
    if-eqz v0, :cond_0

    .line 60
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ExpandAndOrientationProperties;->getForceOrientation()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ExpandAndOrientationProperties;->getAllowOrientationChange()Ljava/lang/Boolean;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v2

    invoke-virtual {v0, v1, v2}, Lcom/burstly/lib/util/ScreenOrientationManager;->setOrientation(Ljava/lang/String;Z)V

    goto :goto_0
.end method

.method public bridge synthetic parsed(Ljava/lang/Object;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 27
    check-cast p1, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ExpandAndOrientationProperties;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/OrientationRequestedEvent;->parsed(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ExpandAndOrientationProperties;)V

    return-void
.end method

.method protected setUpEvent(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;[Ljava/lang/Object;)Z
    .locals 1
    .parameter "mraidView"
    .parameter "args"

    .prologue
    .line 48
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/OrientationRequestedEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    .line 49
    const/4 v0, 0x1

    return v0
.end method
